<template>
  <div class="Ditu">
    <header>
      <van-icon name="arrow-left" @click="retur" />
      <span>地图找房</span>
      <span></span>
    </header>
    <main>

    </main>
  </div>
</template>

<script>
  import getCurrentCityName from "../../utils/getUserLocation";
export default {
  data(){
    return{
      locationMsg:'当前城市：北京市'
    }
  },
  mounted(){
    this.getCurrentCity();
  },
  methods:{
    retur(){
      this.$router.go("-1")
    },
    getCurrentCity(){
      getCurrentCityName().then((city)=>{
        this.locationMsg=city;
      })
    }
  }
};
</script>

<style>
.Ditu {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
header{
  width: 100%;
  height: 50px;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  background: #fff;
  align-items: center;
  font-size: 15px;
}
main{
  flex: 1;
  overflow: scroll;
}
</style>